<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../../common/taglib.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <%@include file="../../common/common-css.jsp" %>
    <%@include file="../../common/common-js.jsp" %>
     <%@include file="../../common/init.jsp" %>
      <script type='text/javascript' src="${pageContext.servletContext.contextPath }/js/WdatePicker.js"></script>
        <script type="text/javascript">
     function getLabelList(){
    	var uplabel = $("#ptypeId").val();
    	if(uplabel!=null&&uplabel!=''){
    	$.ajax({url:"${pageContext.servletContext.contextPath }/background/serviceProvider/getTypeList.html?pid="+uplabel,
		   type:"post",
		   cache:"false",
		   error : function() {
			   alert("系统繁忙，请稍后再试！");
			},
		   success:function(msg){
			   $("#typeId").html(msg);
		   }
		});
    	}else{
    		$("#type_Id").html('<select name="typeId" id="type_Id"><option value="">请选择</option></select>');
    	}
    }
    </script>
  </head>
  
  <body>
<form action="${pageContext.servletContext.contextPath }/background/serviceProvider/update.html" method="post" data-validator-option="{theme:'yellow_right_effect',stopOnError:true}">
		<input type="hidden" name="id" value="${serviceProvider.id}">
		<div class="right">
        	<div class="volume">
            	<img src="${pageContext.servletContext.contextPath }/images/toleft.png" style="margin:23px 0 0 2px;_margin:23px 0 0 0px;" />
            </div>
        	<div class="rightcon">
            	<div class="title">
                	您当前的位置：首页 >服务商管理 > 修改服务商信息
                </div>
                	<div class="titlecon">
                           	 修改服务商信息
                    </div>
                	<div class="addlist">
                        
                        	<table class="addlistcon" border="0" cellpadding="0" cellspacing="0">
                            	<tr>
                                	<td width="30%" align="right" class="odd"><span style="color:#900">*</span>服务商名称：
                                    </td>
                                    <td width="70%"  class="even">
                                    <input style="height: 20px;width: 200px" name="name" type="text" value="${serviceProvider.name}" data-rule="服务商名称: required;name;"/>
                                    </td>
                                </tr>
                                <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>服务商类别：
                                    </td>
                                    <td   class="even"> 
                                    <select name="ptypeId" id="ptypeId" onchange="getLabelList()" style="height: 20px;width: 200px" data-rule="服务商类别: required;name;">
										 	<option value="">请选择</option>
											<c:forEach var="key" items="${uservicetypes}">
												<option value="${key.id}" <c:if test="${key.id eq serviceProvider.ptypeId}">selected="selected"</c:if>>${key.name}</option>
											</c:forEach>
										</select>
                                    </td>
                                </tr>
                                <tr>
                                	<td  align="right" class="odd"><span style="color:#900"></span>服务商子类别：
                                    </td>
                                    <td   class="even" id="typeId">
										<select name="typeId" id="type_Id" style="height: 20px;width: 200px" data-rule="服务商子类别: required;name;">
											<c:forEach var="key" items="${servicetypes}">
												<option value="${key.id}" <c:if test="${key.id eq serviceProvider.typeId}">selected="selected"</c:if>>${key.name}</option>
											</c:forEach>
										</select>
                                    </td>
                                </tr>
                                <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>地址：
                                    </td>
                                    <td   class="even">
                                    <input style="height: 20px;width: 200px" name="address" id="address" value="${serviceProvider.address}" type="text" data-rule="地址: required;name;"/>
                                    </td>
                                </tr>
                                <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>营业时间：
                                    </td>
                                    <td   class="even">
                                    <select name="offericstartweek" id="offericstartweek">
											<option value="0" <c:if test="${serviceProvider.offericstartweek eq '0'}">selected="selected"</c:if>>周日</option>
											<option value="1" <c:if test="${serviceProvider.offericstartweek eq '1'}">selected="selected"</c:if>>周一</option>
											<option value="2" <c:if test="${serviceProvider.offericstartweek eq '2'}">selected="selected"</c:if>>周二</option>
						 					<option value="3" <c:if test="${serviceProvider.offericstartweek eq '3'}">selected="selected"</c:if>>周三</option>
											<option value="4" <c:if test="${serviceProvider.offericstartweek eq '4'}">selected="selected"</c:if>>周四</option>
											<option value="5" <c:if test="${serviceProvider.offericstartweek eq '5'}">selected="selected"</c:if>>周五</option>
											<option value="6" <c:if test="${serviceProvider.offericstartweek eq '6'}">selected="selected"</c:if>>周六</option>
								</select> 
								 <input type="text" id="offericstarttime" name="offericstarttime" value="${serviceProvider.offericstarttime }" onfocus="WdatePicker({dateFmt:'HH:mm'})" class="Wdate" data-rule="营业时间: required;name;"/>-
								 <select name="offericendweek" id="offericendweek">
											<option value="0" <c:if test="${serviceProvider.offericendweek eq '0'}">selected="selected"</c:if>>周日</option>
											<option value="1" <c:if test="${serviceProvider.offericendweek eq '1'}">selected="selected"</c:if>>周一</option>
											<option value="2" <c:if test="${serviceProvider.offericendweek eq '2'}">selected="selected"</c:if>>周二</option>
						 					<option value="3" <c:if test="${serviceProvider.offericendweek eq '3'}">selected="selected"</c:if>>周三</option>
											<option value="4" <c:if test="${serviceProvider.offericendweek eq '4'}">selected="selected"</c:if>>周四</option>
											<option value="5" <c:if test="${serviceProvider.offericendweek eq '5'}">selected="selected"</c:if>>周五</option>
											<option value="6" <c:if test="${serviceProvider.offericendweek eq '6'}">selected="selected"</c:if>>周六</option>
								</select> 
								 <input type="text" id="offericendtime" name="offericendtime" onfocus="WdatePicker({dateFmt:'HH:mm'})" value="${serviceProvider.offericendtime }"  class="Wdate" data-rule="营业时间: required;name;"/>
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>服务电话：
                                    </td>
                                    <td   class="even"><input style="height: 20px;width: 200px" name="telephone"  value="${serviceProvider.telephone}" type="text" data-rule="required;telephone" data-rule-telephone="[/^[0-9]*$/, '请输入数字']""/>
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>负责人姓名：
                                    </td>
                                    <td   class="even"><input style="height: 20px;width: 200px" name="managerName" value="${serviceProvider.managerName}" type="text" data-rule="负责人姓名: required;name;"/>
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>负责人电话：
                                    </td>
                                    <td   class="even">
                                    <input style="height: 20px;width: 200px" name="managerPhone" type="text" value="${serviceProvider.managerPhone}" data-rule="负责人电话: required;name;"/>
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>服务账号：
                                    </td>
                                    <td   class="even">
                                    <input style="height: 20px;width: 200px" name="username" type="text" value="${serviceProvider.username}" data-rule="服务账号: required;name;"/>
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>服务密码：
                                    </td>
                                    <td   class="even">
                                   <input style="height: 20px;width: 200px" name="password" type="text" value="${serviceProvider.password}" data-rule="服务密码: required;name;"/>
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>负责人手机：
                                    </td>
                                    <td   class="even">
                                    <input style="height: 20px;width: 200px" name="managerMobilePhone" value="${serviceProvider.managerMobilePhone}" type="text" data-rule="负责人手机: required;name;"/>
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>自助下单：
                                    </td>
                                    <td   class="even">
                                   <input type="radio" name="selfOrder" value="是" <c:if test="${serviceProvider.selfOrder eq '是' }">checked="checked"</c:if> />是
									<input type="radio" name="selfOrder" value="否" <c:if test="${serviceProvider.selfOrder eq '否' }">checked="checked"</c:if> />否
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900"></span>描述：
                                    </td>
                                    <td   class="even" height="10px;"><textarea name="description" style="height:50px;">${serviceProvider.description}</textarea>
                                    </td>
                                </tr>
                             
                              </table> 
                             <div class="savere" style="float:center; margin-left:34%; _margin-left:17%;">
                               <input type="image" src="${pageContext.servletContext.contextPath }/images/baocun.png" width="101" height="46"/>
							        <a href="javascript:history.go(-1)" ><img src="${pageContext.servletContext.contextPath }/images/fanhui.png" width="101" height="46"></a>
                            </div>
                         
                    </div><!--addlist-->
            </div><!--rightcon-->
        </div><!--right-->
</form>
  </body>
</html>
